Skip to content

New and easy quicksort Algo #11518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Deepak14Jain
Copy link

@Deepak14Jain Deepak14Jain commented Aug 15, 2024

Describe your change:

Hello, I am new to open source..have added a new and easy quick sort algorithm

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@algorithms-keeper algorithms-keeper bot added the tests are failing Do not merge until tests pass label Aug 15, 2024
Copy link
Contributor

@imSanko imSanko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try Running pre commit's

@Deepak14Jain
Copy link
Author

Try Running pre commit's

Hey! new to this and to be frank dont know what u talking about

Copy link
Contributor

@imSanko imSanko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try reading CONTRIBUTING.md then after follow the mentioned instructions:

  1. python3 -m pip install pre-commit # only required the first time pre-commit install

  2. pre-commit run --all-files --show-diff-on-failure

While, Don't forget to All submissions will need to pass the test ruff . before they will be accepted so if possible, try this test locally on your Python file(s) before submitting your pull request.

python3 -m pip install ruff # only required the first time ruff

Also, Please consider running psf/black on your Python file(s) before submitting your pull request. This is not yet a requirement but it does make your code more readable and automatically aligns it with much of PEP 8. There are other code formatters (autopep8, yapf) but the black formatter is now hosted by the Python Software Foundation. To use it,

python3 -m pip install black # only required the first time black

Tip: Read docs before an PR >_

@tianyizheng02
Copy link
Contributor

As already stated, please read CONTRIBUTING.md before you contribute. This was made clear in your own PR description and in the repo's README.

In addition, please make sure that the algorithm that you're contributing isn't already in the repo. We already have multiple implementations of quick sort: https://github.com/search?q=repo%3ATheAlgorithms%2FPython%20quick_sort&type=code

Your implementation seems to be an implementation of 3-way quick sort, which we already have here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests are failing Do not merge until tests pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants